package com.sdjzu.wanfuying.androiddesign.mvvm.coolapk;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class CoolapkViewModel {
    private List<Item> itemList = new ArrayList<>(200);


    CoolapkViewModel() {
        refresh();
    }

    public List<Item> getItemList() {
        return itemList;
    }

    public void refresh() {
        itemList.clear();
        for (int i = 0; i < 100; i++) {
            itemList.add(new Item((int) (Math.random() * 2), new Date((long) (Math.random() * System.currentTimeMillis())).toLocaleString()));
        }
    }
}
